package com.isunland.managesystem.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BasePagerActivity;
import com.isunland.managesystem.entity.ProductLedgerOriginal.ProductLedgerContent;

public class ProductLedgerPagerActivity extends BasePagerActivity {
  public static final String EXTRA_CONTENT = "com.isunland.managesystem.entity.extra_content";
  private int[] title = { R.string.product_detail, R.string.price_detail };
  private ProductLedgerContent content;

  @Override protected void onCreate(Bundle arg0) {
    content = (ProductLedgerContent) getIntent().getSerializableExtra(
        ProductDetailFragment.EXTRA_CONTENT);
    super.onCreate(arg0);
  }

  @Override protected Fragment createFragmentOne() {
    return ProductDetailFragment.newInstance(content);
  }

  @Override protected Fragment createFragmentTwo() {
    return PriceDetailFragment.newInstance(content);
  }

  @Override protected int[] createTitle() {
    return title;
  }
}
